﻿using System;
using NHibernate;
using Hasiu.Entity;

namespace Hasiu.Service
{
    public class TextShowService
    {
        public static readonly TextShowService _ = new TextShowService();

        private ISession Session { get; set; }

        public TextShowService()
        {
            Session = NHibernateHelper.GetCurrentSession();
        }

        public void Update(TextShow textShow)
        {
            Session.Clear();
            Session.Update(textShow);
            Session.Flush();
        }

        public TextShow Get(String id)
        {
            return Session.Get<TextShow>(id);
        }
    }
}
